/*
 * @Author: caihongtai caihongtai
 * @Date: 2025-02-14 16:57:27
 * @LastEditors: caihongtai caihongtai
 * @LastEditTime: 2025-03-19 22:43:31
 * @FilePath: /ai-interview-vue/src/api/user.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '@/utils/request'

export const userApi = {
    // 发送验证码
    sendCode(phone) {
        return request.post('/user/send_code', { phone })
    },

    // 验证码登录
    verifyLogin(params) {
        return request.post('/user/login', params)
    },
    // 获取用户信息
    getUserInfo() {
        return request.get('/user/request')
    },
    // 获取匿名token
    getAnonymousToken() {
        //guest/token
        return request.get('/guest/token')
    },
    // 退出
    logoutUser() {
        return request.get('/user/logout')
    }
} 
